<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS开发小米商城右侧悬浮菜单</title>
    <link rel="stylesheet" href="iconfont/iconfont.css">
    <style>
        ul,
        li,
        p {
            margin: 0;
            padding: 0;
            /*去除前面的点*/
            list-style: none;
        }

        body {
            background-color: #ddd;
            height: 20000px;
        }

        .sidebar {
            /*这个是固定定位，相对于浏览器的定位*/
            position: fixed;
            width: 85px;
            /* height: 500px; */
            /* background-color: #eeedec; */
            /* bottom: 10px; */
            right: 20px;
        }

        /* .sidebar ul {
             border: 1px solid firebrick; 
        } */

        .sidebar ul li {
            /* border: 1px solid blue; */
            background-color: #fff;
            width: 85px;
            height: 85px;
            position: relative;

        }

        .sidebar ul li span {
            display: block;
            border: 1px solid firebrick;
            height: 50px;
            font-size: 30px;
            color: #757575;
            text-align: center;
            line-height: 50px;
        }

        .sidebar ul li p {
            font-size: 14px;
            color: #757575;
            text-align: center;
            line-height: 35px;
        }

        .sidebar ul li:last-child {
            margin-top: 20px;
        }

        /* 鼠标移动上去颜色改变 */
        .sidebar ul li:hover span,
        .sidebar ul li:hover p {
            color: hotpink;
        }

        .sidebar .wxin {
            width: 100px;
            height: 100px;
            position: absolute;
            background-color: #fff;
            padding: 15px;
            top: 0px;
            left: -130px;
            display: none;
        }

        .sidebar ul li:hover .wxin {
            display: block;
        }
    </style>
</head>

<body>
    <div class="sidebar">
        <ul>
            <li>
                <span class="iconfont icon-shouji"></span>
                <p>手机APP</p>
                <div class="wxin">
                    <img src="images/wx.png" alt="" width="100">
                </div>
            </li>
            <li>
                <span class="iconfont icon-touxiang"></span>
                <p>个人中心</p>
            </li>
            <li>
                <span class="iconfont icon-gongju"></span>
                <p>售后服务</p>
            </li>
            <li>
                <span class="iconfont icon-kefu"></span>
                <p>人工客服</p>
            </li>
            <li>
                <span class="iconfont icon-gouwuche"></span>
                <p>购物车</p>
            </li>
            <li>
                <span class="iconfont icon-dingbu"></span>
                <p>回顶部</p>
            </li>
        </ul>
    </div>

</body>

</html>